using System;

namespace Sustainalytics.ESGRatings.BusinessLogic.Computing.Exceptions
{
    /// <summary>
    /// Thrown when set with given id and/or type not found in list
    /// </summary>
    public class UnknownSetException : Exception
    {
        public UnknownSetException(Guid setId)
        {
            SetId = setId;
        }

        public UnknownSetException(string message)
            : base(message, null)
        {
        }

        public override string Message
        {
            get
            {
                return this.SetId == default(Guid) ? base.Message : string.Format("Unknown set: {0}.", this.SetId);
            }
        }

        public Guid SetId { get; private set; }
    }
}